try {
  const process = this.pageObj.getApiWidgetByAliasName('modal-process');
  const configs = process?.widgetObj.configs();
  const $form = this.getApiPage().getApiWidgetByAliasName('judge-content').widgetObj;
  const { dataSource } = $form._option;
  const url = new URLSearchParams(window.location.href);
  const Modal = process.widgetObj.getModal();
  let personDetail = JSON.parse(url && url.get('personDetail') || '{}');
  console.log('personDetail', personDetail)
  const taskTypeEnum = { 信息发布: '1', 信息上报: '2', 下发任务: '10' };
  const defaultData = {
    eventId: dataSource.id,
    eventTitle: dataSource.eventTitle,
    projectCode: dataSource.projectCode,

    taskTypeId: taskTypeEnum[$event],
    taskTypeName: $event,
    // 下发部门
    taskIssuDepart: personDetail.deptCode,
    taskIssuDepartName: personDetail.deptName,

    // 下发人
    taskIssuer: personDetail.id,
    taskIssuerName: personDetail.personName,

    // 记录人
    takenotesPersonName: personDetail.personName,
    takenotesPersonId: personDetail.id,

    progress: personDetail.whetherProcess,
  };

  let config;
  let style = { width: 600, height: 400 };
  switch($event) {
    case '记录动态':
      config = configs['记录动态'](1);
      break;
    case '误警事件':
      config = configs['自定义内容']('提示：是否确定为误警事件');
      break;
    case '解除事件':
      config = configs['自定义内容']('提示：是否确定解除事件');
      break;
    case '关闭事件':
      config = configs['自定义内容']('提示：是否确定关闭事件');
      break;
    default:
      config = configs[$event](1);
      if ($event === '协同会商') {
        style.width = 650;
        style.height = 450;
      } else {
        style.height = 500;
      }
  }

  // this.pageObj.getApiWidgetByAliasName('toggle')?.widgetObj.toggle();
  if (config) {
    Modal.type = $event;
    process?.widgetObj.renderModal(config, defaultData);
    process?.widgetObj.show(style);
  }
} catch (e) {
  console.error(e)
}

